package com.tank.util;

import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.SimpleEmail;

public class TestSimpleEmail {

	/**
	 * @param args
	 * @throws EmailException 
	 */
	public static void main(String[] args) throws EmailException {
		SimpleEmail m =new SimpleEmail();
		m.setCharset("utf-8");
		m.setHostName("smtp.163.com");
		m.setAuthentication("ggnote", "502970141");
		m.addTo("zhuogenggai@qq.com", "opark");
		m.setFrom("ggnote@163.com", "ggnote");
		m.setSubject("这是测试主题");
		m.setMsg("这是测试主题<a href='hello'>hello</a>");
		m.send();
		
		System.out.println("sended!");

	}

}
